package d4l.model;



import java.util.*;


/**
 * A module.
 * 
 * Just has a name for the moment.
 * 
 * @author Darren Pearce
 * @version $Revision$
 * @version $Date$
 * 
 */
public class Module {

    private String name;

    private HashMap<TeachingMethod, Float> teachingMethodToHours;


    public Module(String name) {
        setName(name);
        teachingMethodToHours = new HashMap<TeachingMethod, Float>();
    }


    public void setName(String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }


    public void addTeachingMethod(TeachingMethod teachingMethod) {
        addTeachingMethod(teachingMethod, 0);
    }


    public void addTeachingMethod(TeachingMethod teachingMethod, float hours) {
        // can only do this at moment -- won't be able to eventually
        // perhaps
        updateTeachingMethodHours(teachingMethod, hours);
    }


    public void updateTeachingMethodHours(TeachingMethod teachingMethod,
                                          float hours) {
        teachingMethodToHours.put(teachingMethod, hours);
    }

}
